package com.baitiaojun.common.exception;

import com.baitiaojun.common.enums.impl.ServiceExpEnums;

/**
 * 业务异常
 */
public class ServiceException extends GlobalException {

    public ServiceException() {
        super();
    }

    public ServiceException(ServiceExpEnums businessExpEnums) {
        super(new ErrorCode(businessExpEnums));
    }

    public ServiceException(ErrorCode errorCode) {
        super(errorCode);
    }

    public ServiceException(Integer code, String message) {
        super(code, message);
    }

    public ServiceException setCode(Integer code) {
        return (ServiceException) super.setCode(code);
    }

    public ServiceException setMessage(String message) {
        return (ServiceException) super.setMessage(message);
    }

    public Integer getCode() {
        return super.getCode();
    }

    @Override
    public String getMessage() {
        return super.getMessage();
    }
}
